package error

import "fmt"

var u User

func main() {
	user := GetUser()
	fmt.Println(user)
	fmt.Println(&user)
	fmt.Println(*user)
	fmt.Println(user)
	fmt.Println(user.Id)
}

func GetUser() (user *User) {
	return &u
}

func init() {
	u = User{
		Id:   1,
		Name: "ccccc",
	}
}

type User struct {
	Id   int
	Name string
}
